package com.jsu.clubmanagementsystem.service.application;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.common.PageQueryRequest;
import com.jsu.clubmanagementsystem.model.dto.clubapplication.ClubApplicationAddRequest;
import com.jsu.clubmanagementsystem.model.dto.clubapplication.ClubApplicationQueryRequest;
import com.jsu.clubmanagementsystem.model.entity.ClubApplication;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jsu.clubmanagementsystem.model.vo.clubApplication.ClubApplicationListVO;
import com.jsu.clubmanagementsystem.model.vo.clubApplication.ClubApplicationVO;

import java.util.List;

/**
* @author 24753
* @description 针对表【club_application(社团相关申请)】的数据库操作Service
* @createDate 2025-06-01 22:36:13
*/
public interface ClubApplicationService extends IService<ClubApplication> {

    /**
     * 处理社团申请
     *
     * @param addRequest 申请请求
     * @return 申请ID
     */
    Long processClubApplication(ClubApplicationAddRequest addRequest);

    /**
     * 获得封装对象
     *
     * @param clubApplication
     * @return
     */
    ClubApplicationVO getClubApplicationVO(ClubApplication clubApplication);

    /**
     * 查询社团申请列表
     *
     * @param clubApplicationQueryRequest
     * @return
     */
    Page<ClubApplicationVO> listClubApplicationVOByPage(ClubApplicationQueryRequest clubApplicationQueryRequest);

    /**
     * 申请是否存在
     *
     * @param applicationId
     * @return
     */
    boolean isExist(Long applicationId);

    /**
     * 申请是否存在
     *
     * @param applicationId
     * @param type
     * @return
     */
    boolean isExist(Long applicationId, Integer type);

    /**
     * 申请是否存在
     *
     * @param clubApplication 申请对象
     * @return 是否存在
     */
    boolean isExist(ClubApplication clubApplication);

    /**
     * 获取查询条件
     *
     * @param clubApplicationQueryRequest
     * @return
     */
    QueryWrapper<ClubApplication> getQueryWrapper(ClubApplicationQueryRequest clubApplicationQueryRequest);

    /**
     * 获取所有社团申请信息
     * @param pageRequest
     * @return
     */
    Page<ClubApplicationListVO> getAllList(PageQueryRequest pageRequest);

    boolean deleteClubApplication(List<Long> id);

    boolean addApplication(ClubApplicationAddRequest param);
}
